<style>
	#forumheader #nav { margin-top: -5px; font-size: 12px; color: #999; }
		#forumheader #nav a { color: #666; }
	.postlist { padding: 10px 0; border-top: 3px solid #EEE; }
		.owner { border-top-color: #CCFF8F; }
			.postlist a:hover { text-decoration: none; }
	.postauthor { float: left; width: 120px; }
		.postauthor .avatar img { width: 48px; height: 48px; }
		.moduser { margin-top: 1em; font-size: 12px; }
			.moduser a { color: #999; }
	.postcontent { float: right; width: 630px; }
		.postinfo strong { float: right; margin-top: -6px; font-family: Georgia, serif; font-size: 24px; }
			.postinfo { font-size: 12px; color: #666; }
				.postinfo strong a { color: #D0D0D0; text-decoration: none; }
		.defaultpost { padding: 10px 2em 0 0; line-height: 1.8em; }
		.warn, .locked { padding: 8px 0; font-size: 12px; }
			.warn a, .locked { padding: 3px 5px; background: red; color: #FFF; }
				.locked { width: 300px; background: #EEE; color: #999; text-align: center; }
		.freemsg, .paylink { padding: 10px; background: #EEE; }
		.paymsg { padding: 5px 10px; background: #333; font-size: 12px; color: #FFF; text-align: center; }
		.paylink { padding: 20px 10px; font-size: 12px; text-align: center; }
			.paylink .link { padding: 3px 10px; background: #EC5810; color: #FFF; font-weight: bold; }
		.signatures { text-align: right; font-size: 12px; color: #999; }
			.signatures em { font-family: Georgia, serif; font-style: italic; color: #D0D0D0; }
		.pstatus { padding: 8px 10px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; background: #EEE; color: #999; font-size: 12px; font-style: normal; }
		.blockcode { margin: 1em 0; padding: 0 0 0 2em; background: #999; color: #FFF; font-family: 'Panic sans',Monaco,'Courier New',monospace; font-size: 12px; line-height: 1.6em; }
			.blockcode div { padding: 1em 1em 1em .6em; background: #333; }
			.blockcode em { display: block;padding: .3em 1em .3em .6em; border-top: 1px dotted #999; background: #333; cursor: pointer; }
</style>

<div id="post_$post[pid]" class="postlist s_clear <!--{if $post['first']}-->firstpost<!--{elseif $post[author] == $thread[author]}-->owner<!--{/if}-->">
	<div class="postauthor">
		$post[newpostanchor] $post[lastpostanchor]
		<!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
			<div id="userinfo$post[pid]_a">
			<!--{if $bannedmessages & 2 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5) || ($post['status'] & 1))}-->
				<div class="avatar">{lang member_avatar_banned}</div>
			<!--{elseif $post['avatar'] && $showavatars}-->
				<div class="avatar"><a href="space.php?uid=$post[authorid]" target="_blank">$post[avatar]</a></div>
			<!--{/if}-->
			<a target="_blank" href="space.php?uid=$post['authorid']">$post[author]</a>
			<p><em>$post[authortitle]</em></p>
			</div>
		<!--{else}-->
			<div class="avatar">
			<!--{if !$post['authorid']}-->
				<a href="javascript:;">{lang guest} <em>$post[useip]</em></a>
			<!--{elseif $post['authorid'] && $post['username'] && $post['anonymous']}-->
				<!--{if $forum['ismoderator']}--><a href="space.php?uid=$post[authorid]" target="_blank">{lang anonymous}</a><!--{else}-->{lang anonymous}<!--{/if}-->
			<!--{else}-->
				$post[author] <em>{lang member_deleted}</em>
			<!--{/if}-->
			</div>
		<!--{/if}-->
		
		<!--{if $allowedituser || $allowbanuser || ($forum['ismoderator'] && $allowviewip && ($thread['digest'] >= 0 || !$post['first']))}-->
			<ul class="moduser">
				<!--{if $forum['ismoderator'] && $allowviewip && ($thread['digest'] >= 0 || !$post['first'])}-->
					<li><a href="javascript:;" onclick="ajaxget('topicadmin.php?action=getip&fid=$fid&tid=$tid&pid=$post[pid]', 'ajax_getip_$post[count]');doane(event)" title="{lang admin_getip}" class="lightlink">IP</a></li>
				<!--{/if}-->
				<!--{if $allowedituser}-->
					<li><a href="{if $adminid == 1}admincp.php?action=members&username=$post[usernameenc]&submit=yes&frames=yes{else}modcp.php?action=members&op=edit&uid=$post[authorid]{/if}" target="_blank" class="lightlink">{lang edit_member}</a></li>
				<!--{/if}-->
				<!--{if $allowbanuser}-->
					<li>{if $adminid == 1}<a href="admincp.php?action=members&operation=ban&username=$post[usernameenc]&frames=yes" target="_blank" class="lightlink">{lang ban_member}</a>
					{else}<a href="modcp.php?action=members&op=ban&uid=$post[authorid]" target="_blank" class="lightlink">{lang ban_member}</a>
					{/if}</li>
				<!--{/if}-->
			</ul>
			<p id="ajax_getip_$post[count]"></p>
		<!--{/if}-->
	</div>

	<div class="postcontent">
		<div class="postinfo">
			<strong><a title="{lang emailfriend_url_copy}" id="postnum$post[pid]" href="javascript:;" onclick="setcopy('{$boardurl}viewthread.php?tid=$tid&amp;page=$page$fromuid#pid$post[pid]', '{lang post_copied}')"><!--{if !empty($postno[$post[number]])}-->$postno[$post[number]]<!--{else}--><em>{$post[number]}</em><!--{/if}--></a></strong>
			
			<div class="posterinfo">
				{lang poston} $post[dateline]:
				<!--{if $post['first']}-->
					<!--{if $lastmod['modaction']}--><span class="modact"><a href="misc.php?action=viewthreadmod&amp;tid=$tid" title="{lang thread_mod}" onclick="floatwin('open_viewthreadmod', this.href, 600, 410);return false;">{lang thread_mod_by}</a></span><!--{/if}-->
					<!--{if $lastmod['magicname']}--><div class="span"><a href="misc.php?action=viewthreadmod&amp;tid=$tid" title="{lang thread_mod}" onclick="floatwin('open_viewthreadmod', this.href, 600, 410);return false;">{lang magics_logs}</a></span><!--{/if}-->
				<!--{/if}-->
			</div>
		</div>
		
		<div class="defaultpost">
			<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread2'][$post['count']])}--><div class="ad_textlink2" id="ad_thread2_$post[count]">$advlist[thread2][$post[count]]</div><!--{else}--><div id="ad_thread2_$post[count]"></div><!--{/if}-->
			<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread3'][$post['count']])}--><div class="ad_pip" id="ad_thread3_$post[count]">$advlist[thread3][$post[count]]</div><!--{else}--><div id="ad_thread3_$post[count]"></div><!--{/if}--><div id="ad_thread4_$post[count]"></div>

			<div class="postmessage">
				<!--{if $post['warned']}-->
					<div class="warn"><a href="misc.php?action=viewwarning&amp;tid=$tid&amp;uid=$post[authorid]" title="{lang warn_get}" onclick="floatwin('open_viewwarning', this.href, 600, 410);return false;" class="radius5">{lang warn_get}</a></div>
				<!--{/if}-->
				

				<!--{if $post['first']}-->
					<!--{if $thread['special'] == 2 && !$post[message] && $post['authorid'] == $discuz_uid}-->
						<p>
							<a href="post.php?action=edit&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]" onclick="floatwin('open_edit', this.href, 600, 410, '600,0');return false;">{lang post_add_aboutcounter}</a>
						</p>
					<!--{/if}-->
				<!--{/if}-->

			<!--{if $adminid != 1 && $bannedmessages & 1 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
				<div class="locked radius5">{lang message_banned}</div>
			<!--{elseif $adminid != 1 && $post['status'] & 1}-->
				<div class="locked radius5">{lang message_single_banned}</div>
			<!--{elseif $post['first'] && $threadpay}-->
				<div class="freemsg"><!--{if $thread['freemessage']}-->$thread[freemessage]<!--{/if}-->...</div>
				<div class="paymsg">
					<!--{if $thread['price'] > 0}-->{lang pay_comment}<!--{/if}-->
					<!--{if $thread[endtime]}-->{lang pay_free_time}<!--{/if}-->
				</div>
				<div class="paylink">
					<a href="javascript:;" title="{lang pay}" onclick="floatwin('open_pay', 'misc.php?action=pay&tid=$tid&pid=$post[pid]', 600, 410)" class="link radius10">{lang pay}</a>
					<a href="misc.php?action=viewpayments&tid=$tid" onclick="floatwin('open_pay', this.href, 600, 410);return false;">{lang pay_buyers}:$thread[payers]</a>
				</div>
			<!--{else}-->
				<!--{if $bannedmessages & 1 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5))}-->
					<div class="locked radius5">{lang admin_message_banned}</div>
				<!--{elseif $post['status'] & 1}-->
					<div class="locked radius5">{lang admin_message_single_banned}</div>
				<!--{/if}-->
				<!--{if $post['first']}-->
					<!--{if $thread['price'] > 0 && $thread['special'] == 0}-->
						<div class="locked"><em class="right"><a href="misc.php?action=viewpayments&tid=$tid" onclick="floatwin('open_pay', this.href, 600, 410);return false;">{lang pay_view}</a></em>{lang pay_threads}:<strong>{$extcredits[$creditstransextra[1]][title]} $thread[price] {$extcredits[$creditstransextra[1]][unit]} </strong></div>
					<!--{/if}-->
					<!--{if $typetemplate}-->
						$typetemplate
					<!--{elseif $optionlist && !($post['status'] & 1) && !$threadpay}-->
						<div class="typeoption">
							<h4>$forum[threadsorts][types][$thread[sortid]]</h4>
							<table summary="{lang threadtype_option}" cellpadding="0" cellspacing="0" class="formtable datatable">
							<!--{loop $optionlist $option}-->
								<tr class="{echo swapclass('colplural')}">
									<th>$option[title]</th>
									<td><!--{if $option['value']}-->$option[value]<!--{else}-->-<!--{/if}--></td>
								</tr>
							<!--{/loop}-->
							</table>
						</div>
					<!--{/if}-->
					
					<!--{if $thread[special] == 1}-->
						{template viewthread_poll}
					<!--{elseif $thread[special] == 4}-->
						{template viewthread_activity_info}
					<!--{/if}-->
				<!--{/if}-->
				
				<div id="postmessage_$post[pid]">$post[message]</div>
				
				<!--{if $post['first']}-->
					<!--{if $thread[special] == 4}-->
						{template viewthread_activity}
					<!--{/if}-->
				<!--{/if}-->
				
				<style>
					.postattachlist { margin: 2em 180px 0 0; color: #999; }
						.t_attachlist { margin-bottom: 5px; padding: 8px; border: 1px dotted #D0D0D0; font-size: 12px; }
						.t_attachlist dt { display: none; }
						.t_attachlist dd { margin: 0; padding: 0 0 0 15px; background: url({IMGDIR}/new.png) no-repeat 0 50%; overflow: hidden; }
							.attachimg dd { padding: 0; background: none; }
								.attachimg img { max-width: 404px; max-height: 404px; }
							.attach_popup { padding: 5px 10px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; background: #333; color: #FFF; opacity: 0.97; }
				</style>
				<!--{if $post['attachment']}-->
					<div class="locked radius5">{lang attachment}: <em>{lang attach_nopermission}</em></div>
				<!--{elseif $hideattach[$post[pid]] && $post['attachments']}-->
					<div class="locked radius5">{lang attachment}: <em>{lang attachment_reply_show}</em></div>
				<!--{elseif $post['imagelist'] || $post['attachlist']}-->
					<div class="postattachlist">
						<!--{if $post['imagelist']}-->
							$post['imagelist']
						<!--{/if}-->
						<!--{if $post['attachlist']}-->
							$post[attachlist]
						<!--{/if}-->
					</div>
				<!--{/if}-->
				
				<style>
				.newrate { margin: 2em 0; font-size: 12px; }
					.newrate dt { font-weight: bold; }
					.newrate dd { margin: 10px 0 0; padding: 0; }
						.newrate dd li { float: left; margin-right: 6px; position: relative; }
							.newrate dd li img { width: 24px; height: 24px; border: 2px solid #D0D0D0; }
							.newrate dd li span { position: absolute; top: -29px; display: block; padding: 3px 10px; background: #333; white-space: nowrap; color: #FFF; visibility: hidden; opacity: 0.97; }
								.newrate dd li span em { color: #999; }
								.newrate dd a:hover span { visibility: visible; }
				</style>
				<!--{if !empty($post['ratelog'])}-->
					<dl class="newrate">
						<dt>
							<!--{if !empty($postlist[$post[pid]]['totalrate'])}-->
								<a href="misc.php?action=viewratings&amp;tid=$tid&amp;pid=$post[pid]" onclick="floatwin('open_viewratings', this.href, 600, 410);return false;" title="{lang thread_rate_log_lately}">{lang thread_rate_count}: {echo count($postlist[$post[pid]][totalrate]);}</a>
							<!--{/if}-->
						</dt>
						<dd>
							<ul class="s_clear">
							<div id="post_rate_$post[pid]"></div>
							<!--{loop $post['ratelog'] $uid $ratelog}-->
								<li>
									<a href="space.php?uid=$uid" target="_blank">
										<span class="radius5">
											$ratelog[username]: 
											<!--{loop $ratelog['score'] $id $score}-->
												<!--{if $score > 0}-->
													{$extcredits[$id][title]} + $score $extcredits[$id][unit] /
												<!--{else}-->
													{$extcredits[$id][title]} $score $extcredits[$id][unit] /
												<!--{/if}-->
											<!--{/loop}-->
											<em>$ratelog[reason]</em>
										</span>
										{echo discuz_uc_avatar($uid, 'small');}
									</a>
								</li>
							<!--{/loop}-->
							</ul>
						</dd>
					</dl>
				<!--{else}-->
					<div id="post_rate_div_$post[pid]"></div>
				<!--{/if}-->
				<!--{/if}-->
			</div>

		</div>
		<!--{if $post['signature'] && ($bannedmessages & 4 && (($post['authorid'] && !$post['username']) || ($post['groupid'] == 4 || $post['groupid'] == 5) || ($post['status'] & 1)))}-->
		<div class="signatures">
			<div class="locked radius5">{lang member_signature_banned}</div>
		</div>
		<!--{elseif $post['signature'] && !$post['anonymous'] && $showsignatures}-->
		<div class="signatures"><em>Sign ---- </em>$post[signature]</div>
		<!--{/if}-->
		
		<style>
			.postact { width: 100%; font-size: 12px; text-align: right; }
				.postact a { padding: 0 3px; }
				.postact em { float: left; }
		</style>
		
		<div class="postact s_clear">
				<em>
					<a class="fastreply" href="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;reppost=$post[pid]&amp;extra=$extra&amp;page=$page" onclick="floatwin('open_reply', this.href, 600, 410, '600,0');return false;">{lang reply}</a>
					<a class="repquote" href="post.php?action=reply&amp;fid=$fid&amp;tid=$tid&amp;repquote=$post[pid]&amp;extra=$extra&amp;page=$page" onclick="floatwin('open_reply', this.href, 600, 410, '600,0');return false;">{lang reply_quote}</a>
					<!--{if (($forum['ismoderator'] && $alloweditpost && !(in_array($post['adminid'], array(1, 2, 3)) && $adminid > $post['adminid'])) || ($forum['alloweditpost'] && $discuz_uid && $post['authorid'] == $discuz_uid)) && ($thread['digest'] >= 0 || !$post['first'])}-->
						<a class="editpost" href="post.php?action=edit&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]"{if !$post['first'] || !$threadsort && !$thread['special']} onclick="floatwin('open_edit', this.href, 600, 410, '600,0');return false;"{/if}>{lang edit}</a>
					<!--{/if}-->
				</em>
				<p>
					<!--{if $thread['special'] == 3 && ($forum['ismoderator'] || $thread['authorid'] == $discuz_uid) && $discuz_uid != $post['authorid'] && $post['authorid'] != $thread['authorid'] && $post['first'] == 0 && $thread['price'] > 0}-->
						<a href="javascript:;" onclick="setanswer($post['pid'])">{lang reward_set_bestanswer}</a>
					<!--{/if}-->
					<!--{if $raterange && $post['authorid']}-->
						<a href="misc.php?action=rate&amp;tid=$tid&amp;pid=$post[pid]" onclick="floatwin('open_rate', this.href, 250, 270);return false;">{lang rate}</a>
					<!--{/if}-->

					<!--{if $post['rate'] && $forum['ismoderator']}-->
						<a href="misc.php?action=removerate&amp;tid=$tid&amp;pid=$post[pid]&amp;page=$page" onclick="floatwin('open_rate', this.href, 600, 410);return false;">{lang removerate}</a>
					<!--{/if}-->

					<!--{if !$forum['ismoderator'] && $discuz_uid && $reportpost && $discuz_uid != $post['authorid']}-->
						<a href="misc.php?action=report&amp;fid=$fid&amp;tid=$tid&amp;pid=$post[pid]" onclick="floatwin('open_report', this.href, 250, 215);doane(event);">{lang reportpost}</a>
					<!--{/if}-->

					<!--{if $discuz_uid && $magicstatus}-->
						<a href="magic.php?action=usemagic&amp;type=1&amp;pid=$post[pid]" onclick="floatwin('open_magics', this.href, 250, 215);doane(event);">{lang magics_title}</a>
					<!--{/if}-->
					
					<!--{if $forum['ismoderator'] && ($allowdelpost || $allowbanpost)}-->
						<span class="right">
						<label for="manage$post[pid]">
						<!--{if $post['first'] && $thread['digest'] == -1}-->
							<input type="checkbox" id="manage$post[pid]" disabled="disabled" />
						<!--{else}-->
							<input type="checkbox" id="manage$post[pid]" {if !empty($modclick)}checked="checked" {/if}onclick="pidchecked(this);modclick(this, $post[pid])" value="$post[pid]" />
						<!--{/if}-->
						{lang manage}
						</label>
						</span>
					<!--{/if}-->

				</p>
			</div>

		<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['thread1'][$post['count']])}--><div class="ad_textlink1" id="ad_thread1_$post[count]">$advlist[thread1][$post[count]]</div><!--{else}--><div id="ad_thread1_$post[count]"></div><!--{/if}-->
	</div>

<!--{if $post['first'] && $thread['replies']}--><!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['interthread'])}--><div class="ad_column" id="ad_interthread">$advlist[interthread]<!--{else}--><div id="ad_interthread"><!--{/if}--></div><!--{/if}-->
</tr>

<!--{if $aimgs[$post[pid]]}-->
<script type="text/javascript" reload="1">aimgcount[{$post[pid]}] = [{echo implode(',', $aimgs[$post[pid]]);}];attachimgshow($post[pid]);</script>
<!--{/if}-->
</div>